From a3dc5328a3a09b535f46c5bc5d3594df7816abcd Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 24 Jan 2007 11:04:22 +0000 Subject: [PATCH] Fix crash if some secondary CPUs cannot be initialised. Signed-off-by: Keir Fraser --- xen/common/domain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index e91b8028ff..a3e2a15b0f 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -129,6 +129,9 @@ struct vcpu *alloc_idle_vcpu(unsigned int cpu_id) struct vcpu *v; unsigned int vcpu_id = cpu_id % MAX_VIRT_CPUS; + if ( (v = idle_vcpu[cpu_id]) != NULL ) + return v; + d = (vcpu_id == 0) ? domain_create(IDLE_DOMAIN_ID, 0) : idle_vcpu[cpu_id - vcpu_id]->domain; -- 2.30.2